<template>
  <h1>当前求和为：{{ sum }}</h1>
  <button @click="sum++">点我加1</button>
  <hr />
  <h1>
    当前鼠标的坐标为：x：{{ pointCoordinate.x }}， y：{{ pointCoordinate.y }}
  </h1>
</template>

<script>
import { ref } from "vue";
import usePoint from "@/hooks/usePoint";

export default {
  name: "Demo",
  setup() {
    //定义数据
    let sum = ref(0);

    let pointCoordinate = usePoint();

    //返回对象
    return {
      sum,
      pointCoordinate,
    };
  },
};
</script>

<style>
</style>
